﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Meqs.Entity
{
    /// <summary>
    /// 局级用户
    /// </summary>
    [Serializable]
    public class EducationUsers
    {
        public EducationUsers()
        {
        }

        public EducationUsers(int rID, int areaID, string userName, string userActualName, string phone, string passwd, short isAdmin)
        {
            _rID = rID;
            _areaID = areaID;
            _userName = userName;
            _userActualName = userActualName;
            _phone = phone;
            _passwd = passwd;
            _isAdmin = isAdmin;
        }


        private int _rID;
        private int _areaID;
        private string _userName;
        private string _userActualName;
        private string _phone;
        private string _passwd;
        private short _isAdmin;

        public int RID
        {
            get { return _rID; }
            set { _rID = value; }
        }

        public int AreaID
        {
            get { return _areaID; }
            set { _areaID = value; }
        }

        public string UserName
        {
            get { return _userName; }
            set { _userName = value; }
        }

        public string UserActualName
        {
            get { return _userActualName; }
            set { _userActualName = value; }
        }

        public string Phone
        {
            get { return _phone; }
            set { _phone = value; }
        }

        public string Passwd
        {
            get { return _passwd; }
            set { _passwd = value; }
        }

        public short IsAdmin
        {
            get { return _isAdmin; }
            set { _isAdmin = value; }
        }


        public bool Equals(EducationUsers other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;
            return other._rID == _rID;
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;
            if (obj.GetType() != typeof (EducationUsers)) return false;
            return Equals((EducationUsers) obj);
        }

        public override int GetHashCode()
        {
            return _rID;
        }
    }
}
